import Vue from 'vue';
import Vuex from 'vuex';

Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        isLoadding: false,
        isPhone: false,
        isShowScreenshots: false,
        orderNumCode: false,
    },
    // // 2. getters
    getters: {
        getIsShowScreenshots: state => {
            return state.isShowScreenshots;
        },
    },
    mutations: {
        // state指的是state的数据
        // name传递过来的数据
        setIsLoaddingFn(state, name) {
            state.isLoadding = name;
        },
        setIsPhone: (state, info) => {
            state.isPhone = info;
        },
        set_isShowScreenshots(state, load) {
            state.isShowScreenshots = load;
        },
        set_orderNumCode(state, num) {
            state.orderNumCode = num;
        },
    },
    actions: {},
    modules: {},
});
